/*
 * Copyright (c) 2024 Fujian Newland Auto-ID Tech.Co.,Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * 网络数据常量
 */
export const ADDRESS: string = '192.168.78.87'; // 192.168.78.177   192.168.78.150    192.168.79.101 33 192.168.79.101
export const POST: number = 8058; // 8058   8099

export const WIFI_CONNECT: number = 1; // wifi连接
export const WIFI_DISCONNECT: number = 0; // wifi断开
/**
 * 协议
 */
export class Agreement {
  static readonly  RECEIVE_SERIAL_PORT_RECEIVE_HEAD : string = '020130303030' // 0201303030304055524649535430063B03

  static readonly  RECEIVE_SERIAL_PORT_RECEIVE_END : string = '3B03' // 0201303030304055524649535430063B03

  static readonly RECEIVE_SERIAL_PORT_RECEIVE_ACK :string = '06' // 操作成功

  static readonly RECEIVE_SERIAL_PORT_RECEIVE_NAK :string = '15' // 数据的值不在支持范围

  static readonly RECEIVE_SERIAL_PORT_RECEIVE_ENQ :string = '05' // 设置类别或者功能项不存在

  static readonly ORDER_ASYNC_START_INVENTORY : string = '@URFIST1' //  开始盘点

  static readonly ORDER_ASYNC_STOP_INVENTORY : string = '@URFIST0' //  结束盘点

  static readonly ORDER_ASYNC_START_FILTER : string = '@URFITF1' //  开启过滤
  static readonly ORDER_ASYNC_STOP_FILTER : string = '@URFITF0' //   停止过滤
  static readonly ORDER_ASYNC_FILTER_HEAD : string = '@URFIFP00000000W1' //  过滤头
  static readonly ORDER_ASYNC_FILTER_M : string = 'M' //  过滤-开始位置坐标，最小32
  static readonly ORDER_ASYNC_FILTER_P : string = 'P' //  过滤-字符的长度，每个字符4位
  static readonly ORDER_ASYNC_FILTER_L : string = 'L' //  过滤-字符内容
  static readonly ORDER_ASYNC_FILTER_END : string = 'V0R'// 过滤的结束

  static readonly ORDER_ASYNC_START_READ : string = '@URFIER1' //  开启嵌入读

  static readonly ORDER_ASYNC_STOP_READ : string = '@URFIER0' //  关闭嵌入读


  /**
   * AA55BBCC:标识头
   * 000E：内容总长度=标识开始+内容长度+内容
   * 04：标识内容开始
   * 0C：内容长度
   * E28011710000020CB59B75C9：标贴内容
   * 10：验证值-000E 04 0C E28011710000020CB59B75C9值取余
   */
  static readonly ORDER_ASYNC_INVENTORY_HEAD : string = 'AA55BBCC' //  AA55BBCC 000E 04 0C E28011710000020CB59B75C9 10

  /**
   * 天线标识
   * 0A0101
   * 0A : 天线标识头
   * 01 : 位数
   * 01 ：天线值
   */
  static readonly ANTENNA_HEAD : string = '0A' //  0A 01 01
}